package com.haiya.builder.basic;

import com.haiya.builder.basic.builder.Builder;
import com.haiya.builder.basic.product.Product;

/**
 * 指挥官
 */
public class Director {
    private Builder builder;

    public Director(Builder builder) {
        this.builder = builder;
    }

    public Product construct() {
        builder.buildPartA();
        builder.buildPartB();
        builder.buildPartC();
        return builder.getResult();
    }
}
